﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace OhalcLib
{
    [Serializable()]
    public class Tick : ISerializable 
    {
        public DateTime Time { get; set; }

        public Decimal Open { get; set; }

        public Decimal High { get; set; }

        public Decimal Low { get; set; }

        public Decimal Close { get; set; }

        public Decimal BodyWidth { get; set; }

        public Direction Direction { get; set; }


        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("Time", Time);
            info.AddValue("Open", Open);
            info.AddValue("High", High);
            info.AddValue("Low", Low);
            info.AddValue("Close", Close);
            info.AddValue("BodyWidth", BodyWidth);
            info.AddValue("Direction", Direction);
        }
    }

    public enum  Direction{UP,DOWN,DODGE};
}
